// SQL_DBF.cpp : Defines the initialization routines for the DLL.
#include "stdafx.h"
#include <afxdllx.h>
#include "utex.h"

extern "C" int APIENTRY
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID)
{
	if(dwReason == DLL_PROCESS_ATTACH)
	{
		DisableThreadLibraryCalls(hInstance);
		u8text::init();
		Init1CGlobal(hInstance);
		
		CDataBase7* pDB = CDataBase7::GetDefault();
		if(pDB->IsKindOf(RUNTIME_CLASS(CDBEngDB7)))
			pDataDict = *(CDataDictionary**)((long)pDB + 0x20);
		
		context_obj::CContextBase::InitAllContextClasses();
	}
	else if (dwReason == DLL_PROCESS_DETACH)
		context_obj::CContextBase::DoneAllContextClasses();
	return 1;   // ok
}
